//角色模块
import axios from '../utils/request'
//显示用户角色关系列表
export const userrole = query =>{
    return axios({
        url:'api/Relation/UserRoleRelation',
        method:'get',
        params:query
    })
} 
//角色列表
export const rolelist=query=>{
    return axios({
        url:'api/Relation/RoleList',
        method:'get',
        params:query
    })
}
//用户角色关系添加
export const addrelation=d=>{
    return axios({
        url:'api/Relation/AddRelation',
        method:'get',
        params:d
    })
}
//用户角色删除
export const deleterelation=d=>{
    return axios({
        url:'api/Relation/DeleteRelation',
        method:'post',
        data:d
    })
}
//权限列表
export const permission=d=>
{
    return axios({
        url:'api/Relation/PermissionList',
        method:'get',
        params:d
    })
}
//为角色添加权限
export const addpermiss=d=>{
    return axios({
        url: 'api/RolePermiss/AddRolePermiss',
        method: 'get',
        params: d
    })
}
//角色权限列表
export const rolepermiss=d=>{
    return axios({
        url:'api/RolePermiss/RolePermissList',
        method:'get',
        params:d
    })
}
//反填权限
export const findpermiss=d=>{
    return axios({
        url:'api/RolePermiss/GetPermissId',
        method: 'get',
        params: d
    })
}
//导航菜单
export const navpermiss=d=>{
    return axios({
        url: 'api/Relation/NavPermissList',
        method: 'get',
        params: d
    })
}
//添加权限
export const addpermission = d => {
    return axios({
        url: 'api/Permiss/AddPermission',
        method: 'post',
        data: d
    })
}
//删除权限
export const delpermission=d=>{
    return axios({
        url:'api/Permiss/DelPermission',
        method:'post',
        data:d
    })
}
//反填权限
export const backpermission=d=>{
    return axios({
        url:'api/Permiss/BackPermission',
        method:'get',
        params:d
    })
}
//修改权限
export const updpermission=d=>{
    return axios({
        url:'api/Permiss/UpdPermission',
        method:'put',
        data:d
    })
}
//添加角色
export const addrolelist=d=>{
    return axios({
        url: 'api/RolePermiss/AddRoleList',
        method: 'post',
        data: d
    })
}
//删除角色
export const delrolelist=d=>{
    return axios({
        url:'api/RolePermiss/DelRoleList',
        method:'post',
        data:d
    })
}
//日志列表
export const logMessagelist = d => {
    return axios({
        url: 'api/SysLogs/LogMessageList',
        method: 'get',
        params: d
    })
}